<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/style.css">
    <title>Моя раса в Starcraft 2</title>
</head>
<body>
    <div class="main">

        <div class="app" v-show="showMain">
            <div class="app_header">
                <img src="img/logo.png" class="app_logo">
            </div>
            <div class="app_body">
                <button class="app__btn" @click="goToPlay">
                    <i class="fa fa-play-circle-o" aria-hidden="true"></i>
                    <div class="app_btn-text">Начать</div>
                </button>
                <button class="app__btn" @click="goToAchivments">
                    <i class="fa fa-trophy" aria-hidden="true"></i>
                    <div class="app_btn-text">Достижения</div>
                </button>
                <button class="app__btn" @click="goToSocial">
                    <i class="fa fa-user" aria-hidden="true"></i>
                    <div class="app_btn-text">Автор</div>
                </button>
                <button class="app__btn btn_sound">
                    <i class="fa fa-volume-off" aria-hidden="true"></i>
                    <div class="app_btn-text">Звук</div>
                </button>
            </div>
        </div> 

        <div class="app achivments" v-show="showAchivments">
            <div class="app_body">
                <div class="app_body-inner">
                    <h2 class="app_body-title">
                        <i class="fa fa-trophy" aria-hidden="true"></i>
                        Достижения
                    </h2>
                    <div class="app_body-top">
                        <div class="app_card">
                            <div class="app_card-text">Счёт</div>
                            <div class="app_card-count">{{ totalScore }}</div>
                        </div>
                        <div class="app_card">
                            <div class="app_card-text">Открыто рас</div>
                            <div class="app_card-count">{{ openedRace }}</div>
                        </div>
                        <div class="app_card">
                            <div class="app_card-text">Всего игр</div>
                            <div class="app_card-count">{{ totalGames }}</div>
                        </div>
                        <div class="app_card">
                            <div class="app_card-text">Любимая раса</div>
                            <div class="app_card-count">{{ favoritRace }}</div>
                        </div>
                    </div>
                    <div class="app_body-middle">
                        <div class="app_result" 
                        v-for="(race, k) in results"
                        v-show="showResultRace[k]"
                        @click="goToResults(k)">
                            <div class="app_result-score">
                                <i class="fa fa-star"></i>
                                <div class="app_resulr-count">{{ race.points }}</div>
                            </div>
                            <div class="app_resulr-name">{{ race.name }}</div>
                            <div class="app_result-amount">{{ totalGame[k] }}</div>
                        </div>
                    </div>
                    <div class="app_body-bottom">
                        <button class="app__btn btn_back btn_achivment" @click="goToMain">
                            <i class="fa fa-reply" aria-hidden="true"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <div class="app" v-show="showPlay">
            <div class="app_header">
                <div class="app_header-inner">
                    <div class="app_count"># {{ number + 1 }}</div>
                    <div class="app_text">{{ questions[number][0] }}</div>
                </div>
            </div>
            <div class="app_body">
                <button class="app__btn"
                                v-for="(answer, i) in questions[number][1]"
                                @click="nextQuestions(questions[number][2][i])">
                    <div class="btn_text">{{ answer }}</div>
                </button>
            </div>
        </div>

        <div class="app" v-show="showSocial">
            <div class="app_body">
                <a target="_blank" href="" class="app__btn">
                    <i class="fa fa-instagram" aria-hidden="true"></i>
                    <div class="app_btn-text">Instagram</div>
                </a>
                <a target="_blank" href="" class="app__btn">
                    <i class="fa fa-twitter" aria-hidden="true"></i>
                    <div class="app_btn-text">Twitter</div>
                </a>
                <a target="_blank" href="" class="app__btn">
                    <i class="fa fa-facebook" aria-hidden="true"></i>
                    <div class="app_btn-text">Facebook</div>
                </a>
                <a target="_blank" href="" class="app__btn">
                    <i class="fa fa-vk" aria-hidden="true"></i>
                    <div class="app_btn-text">Vkontacte</div>
                </a>
                <a target="_blank" href="" class="app__btn">
                    <i class="fa fa-youtube-play" aria-hidden="true"></i>
                    <div class="app_btn-text">Youtube</div>
                </a>
                <div class="app_body-bottom">
                    <button class="app__btn btn_back" @click="goToMain">
                        <i class="fa fa-reply" aria-hidden="true"></i>
                    </button>
                </div>
            </div>
        </div>

        <div class="app results" v-show="showResults" :data-race="resultRace">
            <div class="app_body">
                <div class="app_results-inner">
                    <div class="results_title">{{ results[resultRace].name }}</div>
                    <div class="results_img">
                        <img :src="'img/'+resultRace+'_logo.png'" alt="">
                    </div>
                    <div class="results_text-box">
                        <p class="results_text">{{ results[resultRace].description }}</p>  
                        <p class="results_quote">{{ results[resultRace].quote1 }}</p>
                        <p class="results_quote">{{ results[resultRace].quote2 }}</p>
                        <p class="results_author">{{ results[resultRace].author }}</p>
                    </div>
                    <div>
                        <button :class="'app__btn btn_back btn_'+resultRace" @click="goToAchivments">
                            <i class="fa fa-reply" aria-hidden="true"></i>
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
    </div>

    <script src="js/vue.js"></script>
    <script src="js/const.js"></script>
    <script type="application/javascript" src="js/main.js"></script>
</body>
</html>